<?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Controllers\Api\Controller;
use Illuminate\Http\Request;
use App\Models\Order;


class DashboardController extends Controller
{
    /**
     * 仪表盘信息统计
     */
    public function stat(Request $request, Order $order)
    {

        $result = $order->statistic();
        return $this->success($result);
    }

    /**
     * 统计订单列表
     */
    public function statList(Request $request, Order $order)
    {
        $type = $request->input('type');
        $result = $order->statList($type);
        return $this->success($result);
    }
}
